/*
----------------------------------------------------------------------------------------------------
This source file is part of the Gamut Framework
Copyright (c) 2007 by Ryan Holcombe

This program is free software; you can redistribute it and/or modify it under the terms of the GNU
Lesser General Public License as published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
----------------------------------------------------------------------------------------------------
*/


#ifndef _IGameObject_h_
#define _IGameObject_h_

#include <string>

namespace Gamut
{

	/**
 		Defines a set of functions necessary to run a generic game object
	*/

	class IGameObject
	{
	private:
		friend class GameObjectManager;
		
	protected:
		std::string mName;				//!< the name of the object
		
	public:
		/**
			\brief initialises the object when it is added to the Game Object Manager
		*/
		virtual void onAdd() = 0;
	
	
		/**
			\brief cleans up the object on shutdown
		*/
		virtual void onDestroy() = 0;

		
		/**
			\brief this is run each frame by the Game Object Manager
			\param[in] elapsed time in seconds since the last frame
		*/
		virtual void tick(double elapsed) = 0;
		

		/**
			\brief get the name of the object
			\return the name in std::string format
		*/
		const std::string& getName() { return mName; }		
	};
	
}


#endif
